package kr.hkit.powerjava.chapter11;

class Std {
	String name;
	String party;
	String department;
	int stdNum;
	int grade;
	int score;
	
	public Std() {}

	public Std(String name, String party, String department, int stdNum,
			int grade, int score) {
		this.name = name;
		this.party = party;
		this.department = department;
		this.stdNum = stdNum;
		this.grade = grade;
		this.score = score;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getParty() {
		return party;
	}

	public void setParty(String party) {
		this.party = party;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public int getStdNum() {
		return stdNum;
	}

	public void setStdNum(int stdNum) {
		this.stdNum = stdNum;
	}

	public int getGrade() {
		return grade;
	}

	public void setGrade(int grade) {
		this.grade = grade;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	@Override
	public String toString() {
		return String
				.format("Std [name=%s, party=%s, department=%s, stdNum=%s, grade=%s, score=%s]",
						name, party, department, stdNum, grade, score);
	}
}

class UnderGraduate extends Std{
	String group;

	public UnderGraduate(String name, String party, String department,
			int stdNum, int grade, int score, String group) {
		super(name, party, department, stdNum, grade, score);
		this.group = group;
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	@Override
	public String toString() {
		return String
				.format("UnderGraduate [group=%s, name=%s, party=%s, department=%s, stdNum=%s, grade=%s, score=%s]",
						group, name, party, department, stdNum, grade, score);
	}
}

class Graduate extends Std {
	String ass;
	double bur;

	public Graduate(String name, String party, String department, int stdNum,
			int grade, int score, String ass, double bur) {
		super(name, party, department, stdNum, grade, score);
		this.ass = ass;
		this.bur = bur;
	}
	
	public String getAss() {
		return ass;
	}

	public void setAss(String ass) {
		this.ass = ass;
	}

	public double getBur() {
		return bur;
	}

	public void setBur(double bur) {
		this.bur = bur;
	}

	@Override
	public String toString() {
		return String
				.format("Graduate [ass=%s, bur=%s, name=%s, party=%s, department=%s, stdNum=%s, grade=%s, score=%s]",
						ass, bur, name, party, department, stdNum, grade, score);
	}
}